﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:c="clr-namespace:personalplaner.controls"
                    xmlns:v="clr-namespace:personalplaner.views"
                    xmlns:k="clr-namespace:personalplaner.common.themes;assembly=personalplaner.common">

    <Style TargetType="{x:Type c:MenuControlContainer}">
        <Setter Property="Opacity" Value="0"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static k:ResourceKeys.DarkForegroundBrush}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type  c:MenuControlContainer}" >
                    <Grid>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="50"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>

                            <Border Background="{DynamicResource {x:Static k:ResourceKeys.MenuHeaderBackgroundBrush}}" />

                            <Border Background="{DynamicResource {x:Static k:ResourceKeys.BackgroundBrush}}" Grid.Row="1"/>

                            <Border Grid.Row="1" Height="40" VerticalAlignment="Top" Background="{DynamicResource {x:Static k:ResourceKeys.SubMenuHeaderBackgroundBrush}}" BorderThickness="0,1,0,1" BorderBrush="{DynamicResource {x:Static k:ResourceKeys.SubMenuHeaderBorderBrush}}"/>

                        </Grid>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="75"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>

                            <!-- Menu -->
                            <v:MainMenu Margin="5,10,0,0"/>

                            <ContentPresenter ContentSource="SelectedItem" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Grid.Row="1" />

                        </Grid>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.25" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.25" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!--<Style TargetType="{x:Type c:MenuControlContainer}">
        <Setter Property="Opacity" Value="0"/>
        <Setter Property="Foreground" Value="#E1FFFFFF"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type  c:MenuControlContainer}" >
                    <Grid>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="50"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>

                            <Border>
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Offset="0.0" Color="#505050" />
                                        <GradientStop Offset="1.0" Color="#282828" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>

                            <Border Background="Black" Grid.Row="1"/>

                            <Border Grid.Row="1" Height="40" VerticalAlignment="Top">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Color="#777777" Offset="0"/>
                                            <GradientStop Color="#5A5A5A" Offset="1"/>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>

                        </Grid>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="75"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>

                            <v:MainMenu Margin="5,10,0,0"/>

                            <ContentPresenter ContentSource="SelectedItem" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Grid.Row="1" />

                        </Grid>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.25" To="1"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.25" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>-->
    
</ResourceDictionary>